package com.example.backgroundmanager.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;

import java.util.List;


@Data
@TableName("sys_comment")
public class Comment extends Model<Article> {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String content;

    private Integer userId;

    private String time;

    private Integer pid;
    @TableField(exist = false)
    private String pNickname;
    @TableField(exist = false)
    private Integer pUserId;

    private Integer originId;
    private Integer articleId;

    @TableField(exist = false)
    private String nickname;
    @TableField(exist = false)
    private String avatarUrl;
    @TableField(exist = false)
    private List<Comment> children;

}
